// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
import Foundation

//let urls = [
//    "https://github.com/PerfectlySoft/Perfect-HTTPServer.git",      //HTTP服务
//    "https://github.com/PerfectlySoft/Perfect-MySQL.git",           //MySQL服务
//    "https://github.com/PerfectlySoft/Perfect-Mustache.git"         //Mustache
//]
//
//let package = Package(
//    name: "YDPerfectServer",
//    targets: [
//        .target(name: "YDPerfectServer", dependencies: ["PerfectHTTPServer"]),
//        .testTarget(name: "YDPerfectServerTests", dependencies: ["YDPerfectServer"])
//    ],
//    dependencies: urls.map { .Package(url: $0, versions: Version(3,0,0)..<Version(4,0,0)) }
//)


var my_bool = true


let package = Package(
    name: "YDPerfectServer",
    products: [
        .executable(name: "YDPerfectServer", targets: ["YDPerfectServer"])
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
        .package(url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git", from: "3.0.0"),
        .package(url:"https://github.com/PerfectlySoft/Perfect-MySQL.git", from: "3.0.0"),
        .package(url: "https://github.com/PerfectlySoft/Perfect-Mustache.git", from: "3.0.0")
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
        .target(name: "YDPerfectServer", dependencies: ["PerfectHTTPServer", "PerfectMustache","PerfectMySQL"]),
        .testTarget(name: "YDPerfectServerTests", dependencies: ["YDPerfectServer"])
    ]
)
